<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateStatResourcesTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('stat_resources', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('server_id')->comment('游戏服ID');
            $table->date('date_time')->comment('日期');
            $table->tinyInteger('resource_type')->comment('资源类型1:仙晶，2元宝、3金币、4灵石');
            $table->integer('change_type')->comment('改变状态ID');
            $table->integer('number')->comment('消耗数量');
            $table->tinyInteger('way_type')->default(1)->comment('1:消耗2:得到');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('stat_resources');
    }
}
